home *** CD-ROM | disk | FTP | other *** search
- /*
- File: TextEditorGlobals.h
-
- Contains: TextEditor globals
-
- Written by: Dave Stafford
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
- */
-
- #ifndef _TEXTEDITORGLOBALS_
- #define _TEXTEDITORGLOBALS_
-
- #ifndef SOM_Module_OpenDoc_Global_TypesB_defined
- #include <ODTypesB.xh>
- #endif
-
- // -- OpenDoc Public Utilities --
-
- #ifndef _ITEXT_
- #include <IText.h> // for ODScriptCode and ODLangCode
- #endif
-
- //------------------------------------------------------------------------------
- // Forward declarations
- //------------------------------------------------------------------------------
-
- struct TextEditorGlobals;
-
- class ODMenuBar;
- class ODFocusSet;
-
- //------------------------------------------------------------------------------
- // Globals
- //------------------------------------------------------------------------------
-
- extern ODUShort gGlobalsUsageCount;
- extern TextEditorGlobals* gGlobals;
-
- //------------------------------------------------------------------------------
- // Globals struct
- //------------------------------------------------------------------------------
-
- struct TextEditorGlobals
- {
- TextEditorGlobals();
-
- ODMenuBar* fMenuBar;
- ODFocusSet* fUIFocusSet;
-
- ODTypeToken fSelectionFocus;
- ODTypeToken fClipboardFocus;
- ODTypeToken fMenuFocus;
- ODTypeToken fModalFocus;
- ODTypeToken fKeyFocus;
-
- ODTypeToken fFrameView;
- ODTypeToken fLargeIconView;
-
- ODTypeToken fSmallIconView;
- ODTypeToken fThumbnailView;
- ODTypeToken fMainPresentation;
- ODTypeToken fRulerPresentation;
- ODTypeToken fUndefinedPresentation;
-
- ODTypeToken fNativeData;
- ODTypeToken fImportedData;
- ODTypeToken fStyledTextData;
-
- ODValueType fAppleHFSFlavor;
- ODValueType fScrapTextValue;
- ODValueType fStyledTextKind;
- ODValueType fTextFileValue;
-
- Handle fThumbnail;
-
- ODScriptCode fEditorsScript;
- ODLangCode fEditorsLanguage;
- };
-
- //------------------------------------------------------------------------------
- // Globals struct
- //------------------------------------------------------------------------------
-
- inline TextEditorGlobals::TextEditorGlobals()
- {
- fMenuBar = kODNULL;
- fUIFocusSet = kODNULL;
-
- fSelectionFocus = kODNullTypeToken;
- fClipboardFocus = kODNullTypeToken;
- fMenuFocus = kODNullTypeToken;
- fModalFocus = kODNullTypeToken;
- fKeyFocus = kODNullTypeToken;
-
- fFrameView = kODNullTypeToken;
- fLargeIconView = kODNullTypeToken;
-
- fSmallIconView = kODNullTypeToken;
- fThumbnailView = kODNullTypeToken;
- fMainPresentation = kODNullTypeToken;
- fRulerPresentation = kODNullTypeToken;
-
- fNativeData = kODNullTypeToken;
- fImportedData = kODNullTypeToken;
- fStyledTextData = kODNullTypeToken;
-
- fAppleHFSFlavor = kODNULL;
- fScrapTextValue = kODNULL;
- fStyledTextKind = kODNULL;
- fTextFileValue = kODNULL;
-
- fThumbnail = kODNULL;
-
- fEditorsScript = 0;
- fEditorsLanguage = 0;
- }
-
-
- #endif